package org.openzip.openzip.unpacking.view.swing;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;

/**
 * 
 * DO NOT USE!
 * @author Jakub
 *
 */
public class ZipEntryFile
{
	private String name;
	private Collection<ZipEntryFile> children;
	
	public ZipEntryFile(String name, Collection<ZipEntryFile> children){
		this.name = name;
		this.children = children;
	}
	
	public ZipEntryFile(String name){
		this(name, new ArrayList<ZipEntryFile>());
	}
	
	public String getName(){
		return name;
	}
	
	public boolean hasChildren(){
		return children.size() > 0;
	}
	
	public int childrenCount(){
		return children.size();
	}
	
	public Collection<ZipEntryFile> getChildren(){
		return new ArrayList<ZipEntryFile>(children);
	}

	public boolean addChild(ZipEntryFile e){
		return children.add(e);
	}

	public boolean removeChild(ZipEntryFile e){
		return children.remove(e);
	}
		
}
